﻿/*
	Copyright (c) 2013 Andrew Meyer

	Permission is hereby granted, free of charge, to any person obtaining a copy of this software
	and associated documentation files (the "Software"), to deal in the Software without
	restriction, including without limitation the right to use, copy, modify, merge, publish,
	distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
	Software is furnished to do so, subject to the following conditions:

	The above copyright notice and this permission notice shall be included in all copies or
	substantial portions of the Software.

	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
	BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
	DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

namespace Ascend
{
	/// <summary>
	/// A mask for specifying which transform properties of an Ascend.AnimatedSceneNode are to be
	/// updated when applying an Ascend.ObjectPose during animation. This class cannot be inherited.
	/// </summary>
	public sealed class AnimationPoseMask
	{
		#region Lifecycle
		
		/// <summary>
		/// Initializes a new instance of the Ascend.AnimationPoseMask class with all mask values
		/// turned on.
		/// </summary>
		public AnimationPoseMask()
		{
			X = true;
			Y = true;
			Z = true;

			AngleX = true;
			AngleY = true;
			AngleZ = true;

			ScaleX = true;
			ScaleY = true;
			ScaleZ = true;
		}
		#endregion

		#region Public Properties
		/// <summary>
		/// Gets or sets whether to update the X property of an Ascend.AnimatedSceneNode when an
		/// Ascend.ObjectPose is applied.
		/// </summary>
		public bool X
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets whether to update the Y property of an Ascend.AnimatedSceneNode when an
		/// Ascend.ObjectPose is applied.
		/// </summary>
		public bool Y
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets whether to update the Z property of an Ascend.AnimatedSceneNode when an
		/// Ascend.ObjectPose is applied.
		/// </summary>
		public bool Z
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets whether to update the AngleX property of an Ascend.AnimatedSceneNode when
		/// an Ascend.ObjectPose is applied.
		/// </summary>
		public bool AngleX
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets whether to update the AngleY property of an Ascend.AnimatedSceneNode when
		/// an Ascend.ObjectPose is applied.
		/// </summary>
		public bool AngleY
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets whether to update the AngleZ property of an Ascend.AnimatedSceneNode when
		/// an Ascend.ObjectPose is applied.
		/// </summary>
		public bool AngleZ
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets whether to update the ScaleX property of an Ascend.AnimatedSceneNode when
		/// an Ascend.ObjectPose is applied.
		/// </summary>
		public bool ScaleX
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets whether to update the ScaleY property of an Ascend.AnimatedSceneNode when
		/// an Ascend.ObjectPose is applied.
		/// </summary>
		public bool ScaleY
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets whether to update the ScaleZ property of an Ascend.AnimatedSceneNode when
		/// an Ascend.ObjectPose is applied.
		/// </summary>
		public bool ScaleZ
		{
			get;
			set;
		}
		#endregion

		#region Public Methods
		/// <summary>
		/// Creates a copy of this Ascend.AnimationPoseMask.
		/// </summary>
		/// <returns>
		/// Returns the copy.
		/// </returns>
		public AnimationPoseMask Clone()
		{
			return (AnimationPoseMask)MemberwiseClone();
		}
		#endregion
	}
}
